package cn.kmsoft.stgeometry.landm;

import java.io.Serializable;

public class Point implements Serializable {
    /**
     *
     */
    private static final long serialVersionUID = 1L;

    private double x;
    private double y;

    public double getX() {
        return this.x;
    }

    public void setX(double x) {
        this.x = x;
    }

    public double getY() {
        return this.y;
    }

    public void setY(double y) {
        this.y = y;
    }

    public Point(double x, double y) {
        this.x = x;
        this.y = y;
    }

    public Point() {
    }

    /**
     * 重写equals方法
     */
    @Override
    public boolean equals(Object object) {
        if (object instanceof Point) {
            Point newpt = (Point) object;
            if (this.x == newpt.getX() && this.y == newpt.getY()) {
                return true;
            }
        }
        return false;
    }
}
